package com.example.demo.respository;

import com.example.demo.api.CarStation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@Mapper
public interface CarRepository {

    @Select("select * from parkinglot")
    public List<CarStation> findAll();

    @Update("update parkinglot set Oc= 1 where Pkcode=#{PKcode}")
    public boolean updateon(String PKcode);

    @Update("update parkinglot set Oc= 0 where Pkcode=#{PKcode}")
    public boolean updateoff(String PKcode);

    @Select("select * from parkinglot where Pkcode=#{PKcode}")
    public CarStation selectPk(String PKcode);


}
